<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('teacher')} > ${i18n.getMessage('create_one')}">
</@showTitle>

<div id="error" style="display:none"></div>

<form action="teacher/addTeacher.sgt" validator="teacher/validateTeacher.sgt" onsubmit="submitFormValidation(this); return false;" onreset="$('error').hide()">
	<table id="dataTable" align="center" cellspacing="5" cellpadding="0">
		<tr>
			<td class="name"><@required/>${i18n.getMessage('firstName')}:</td>
			<td><input type="text" name="firstName" style="width:200px"/> </td>
		</tr>
		<tr>
			<td class="name">${i18n.getMessage('midName')}:</td>
			<td><input type="text" name="midName" style="width:200px"/> </td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('lastName')}:</td>
			<td><input type="text" name="lastName" style="width:200px"/> </td>
		</tr>
		<tr>
			<td class="name">${i18n.getMessage('dateOfBirth')}:</td>
			<td><input type="text" name="dateOfBirth" style="width:200px"/><img class="calendarImg" src="images/calendar/calendar.gif" onclick="displayCalendar(document.forms[0].dateOfBirth, '${i18n.getMessage('format.date')}', this)"/></td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('gender')}:</td>
			<td>
				<input type="radio" name="gender" value="MALE"/> ${i18n.getMessage('gender.male')}
				<input type="radio" name="gender" value="FEMALE"/> ${i18n.getMessage('gender.female')}
			</td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('teacherType')}:</td>
			<td>
				<select name="teacherType" style="width:204px">
					<#list teacherTypes as teacherType>
						<option value="${teacherType}" <#if (teacherType.toString() = 'INSTRUCTOR')>selected</#if>>${i18n.getMessage(teacherType.key)}</option>
					</#list>
				</select>
			</td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('nationality')}:</td>
			<td>
				<select name="nationality" style="width:204px">
					<#list nationalities as nationality>
						<option value="${nationality}" <#if (nationality.toString() = 'VIETNAM')>selected</#if>>${i18n.getMessage(nationality.key)}</option>
					</#list>
				</select>
			</td>
		</tr>
		<tr>
			<td class="name"><@required/>${i18n.getMessage('campus')}:</td>
			<td>
				<select name="campus" style="width:204px">
					<#list campuses as campus>
						<option value="${campus}" <#if (campus.toString() = 'QUANGTRUNG')>selected</#if>>${i18n.getMessage(campus.key)}</option>
					</#list>
				</select>
			</td>
		</tr>
		<tr>
			<td class="name"> ${i18n.getMessage('email')}:</td>
			<td><input type="text" name="email" style="width:200px"/> </td>
		</tr>
		<tr>
			<td class="name"> ${i18n.getMessage('phoneNumber')}:</td>
			<td><input type="text" name="phoneNumber" style="width:200px"/> </td>
		</tr>
		<tr>
			<td class="name" style="vertical-align:top">${i18n.getMessage('comment')}:</td>
			<td><textarea name="comment" style="width:350px;height:80px;"></textarea></td>
		</tr>
		<tr>
			<td class="name"></td>
			<td>
				<input type="submit" value="${i18n.getMessage('add')}" class="button_style"/> 
				<input type="reset" value="${i18n.getMessage('reset')}" class="button_style"/> 
			</td>
		</tr>
	</table>
</form>

<script>
	$('error').hide();
</script>